<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<base href="<%=basePath%>">

<title>My JSP 'MyJsp.jsp' starting page</title>
<meta charset="UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/iconfont.css">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/swiper.min.css">
<link rel="stylesheet" href="css/styles.css">
<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
<script src="js/bootstrap.min.js" charset="UTF-8"></script>
<script src="js/swiper.min.js" charset="UTF-8"></script>
<script src="js/global.js" charset="UTF-8"></script>
<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>


<script src="js/orderpay.js" charset="UTF-8"></script>
<script type="text/javascript">


</script>
</head>
<body>
	<%@include file="personal_top.jsp"%>
	
	<div class="content clearfix bgf5">
		<section class="user-center inner clearfix">
			<div class="user-content__box clearfix bgf">
				<div class="title">购物车-确认支付</div>
				<div class="shop-title">收货地址</div>
				<form action="" class="shopcart-form__box">
					<div class="addr-radio" id="showdivaa">
					<c:forEach items="${alist }" var="a" varStatus="status">
					
					<c:if test="${status.index==0 }"><div class="radio-line radio-box active"></c:if>
					<c:if test="${status.index!=0 }"><div class="radio-line radio-box "></c:if>	
					
							<label class="radio-label ep"
								title="">
								<input name="addr"  value="0" autocomplete="off"
								type="radio"><i class="iconfont icon-radio"></i> ${a.uaddress}&nbsp&nbsp&nbsp&nbsp ${user.uphone}&nbsp&nbsp&nbsp&nbsp（${a.aname}收）
							</label>
							<c:if test="${a.adefault==1}">
						 <a href="javascript:void(0)" class="default">默认地址</a>
						</c:if>
						<c:if test="${a.adefault==0}">
						<a href="javascript:void(0)" class="default" onclick="updateDefault(${status.index})">设为默认地址</a>
							
						</c:if>			
						</div>
					</c:forEach>	
					</div>
					<div class="add_addr">
						<a href="uaddress.jsp">添加新地址</a>
					</div>
					<div class="shop-title">订单详情</div>
					<div class="shop-order__detail">
						<table class="table">
							<thead>
								<tr>
									<th width="120"></th>
									<th width="300">商品信息</th>
									<th width="150">单价</th>
									<th width="200">数量</th>
									<th width="200">运费</th>
									<th width="80">总价</th>
								</tr>
							</thead>
							
							<tbody>							
							<c:forEach items="${orderlist }" var="o" varStatus="status">				     
							<tr>
									<th scope="row"><a href="item_show.jsp"><div
												class="img">
												<img src="images/temp/${imgurllist[status.index] }" alt="" class="cover">
											</div></a></th>
									<td>
										<div class="name ep3">${o.clothes.cname}</div>
										<div class="type c9">颜色分类：${o.clothes.ccolor} 尺码：${o.clothes.csize}</div>
									</td>
									<td>${o.clothes.cprice}</td>
									<td>${o.onum}</td>
									<td>¥0.0</td>
									<td>${o.oprice}</td>
								</tr>
							</c:forEach>
										</tbody>
							
							
							
						</table>
					</div>
					<div class="shop-cart__info clearfix">
						<div class="pull-left text-left">
							<div class="info-line text-nowrap">
								购买时间：<span class="c6">${time}</span>
							</div>
							<div class="info-line text-nowrap">
								交易号：<span class="c6">${ordernum}</span>
							</div>
						</div>
						<div class="pull-right text-right">
							<div class="info-line">
								运费：<span class="c6">¥0.00</span>
							</div>
							<div class="info-line">
								合计：<b class="fz18 cr">${sumprice}</b>
							</div>
							
						</div>
					</div>
					<div class="shop-title">确认订单</div>
					<div class="pay-mode__box">
						
						<div class="radio-line radio-box">
							<label class="radio-label ep"> <input name="pay-mode"
								value="2" autocomplete="off" type="radio" checked="checked"><i
								class="iconfont icon-radio"></i> <img
								src="images/icons/alipay.png" alt="支付宝支付">
							</label>
							
						</div>	
					</div>
					<div class="user-form-group shopcart-submit">
						<input type="button" class="btn" onclick="location='alipay.trade.page.pay.jsp?WIDout_trade_no=${ordernum}&WIDtotal_amount=${sumprice}&WIDsubject=${ordername }&WIDbody=${ordername }'" value="继续支付"/>
					</div>
					<script>
						$(document).ready(
								function() {
									$(this).on(
											'change',
											'input',
											function() {
												$(this).parents('.radio-box')
														.addClass('active')
														.siblings()
														.removeClass('active');
											})
								});
					</script>
				</form>
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item"><a href="udai_welcome.html"
				class="r-item-hd"> <i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">用户中心</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="udai_shopcart.html"
				class="r-item-hd"> <i class="iconfont icon-cart"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">购物车</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="udai_collection.html"
				class="r-item-hd"> <i class="iconfont icon-aixin"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">我的收藏</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="" class="r-item-hd"> <i
					class="iconfont icon-liaotian"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">联系客服</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="issues.html"
				class="r-item-hd"> <i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">留言反馈</span>
					</div>
			</a></li>
			<li class="r-toolbar-item to-top"><i class="iconfont icon-top"></i>
				<div class="r-tip__box">
					<span class="r-tip-text">返回顶部</span>
				</div></li>
		</ul>
		<script>
			$(document).ready(function() {
				$('.to-top').toTop({
					position : false
				})
			});
		</script>
	</div>
	<!-- 底部信息 -->
	<%@include file="bottom.jsp"%>
</body>
</html>